/**
 * 
 * 广州锐鹏计算机科技有限公司（www.ruipengkj.com）
 * 
 * 
 * Copyright (c) 2011-2012 RUIPENGKJ.Co.Ltd. All rights reserved.
 * 
 * */
package com.ruipengkj.bean;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;


/**
 * 说明：
 * Entity Name 库存报警
 * @Author：李智深
 * @Date：2012-03-14
 */
@Entity
@Table(name="ruipeng_tb_TStockAlarm")
public class TStockAlarm implements Serializable{

	private static final long serialVersionUID = 1L;
	
	private String AlarmID;//报警编号CHAR(15)PK
	
	private String Type;//报警类型 1为总量报警  2为任一仓库数量达阀值报警  3为某一仓库数量达阀值报警
	
	private String StoreID;//仓库编号CHAR(15)
	
	private String Operator;//操作人	
	
	private Date HappenTime;//操作时间DATETIME
	
	private int MinWalve;//最低阀值Integer

	private int MaxWalve;//最高阀值Integer
	
	private Date endTime;//结束时间  查询条件 不进数据库
	
	private TCommodity TCommodity;//商品
	
	private int num;//当前库存量 不进数据库

	@Id
	@Column(name = "AlarmID", length=15)
	public String getAlarmID() {
		return AlarmID;
	}

	public void setAlarmID(String alarmID) {
		AlarmID = alarmID;
	}

	@Column(name = "Type", length=15)
	public String getType() {
		return Type;
	}

	public void setType(String type) {
		Type = type;
	}

	@Column(name = "StoreID", length=15)
	public String getStoreID() {
		return StoreID;
	}

	public void setStoreID(String storeID) {
		StoreID = storeID;
	}

	@Column(name = "Operator", length=15)
	public String getOperator() {
		return Operator;
	}

	public void setOperator(String operator) {
		Operator = operator;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "HappenTime", nullable = false, length = 19)
	public Date getHappenTime() {
		return HappenTime;
	}

	public void setHappenTime(Date happenTime) {
		HappenTime = happenTime;
	}

	@Column(name = "MinWalve")
	public int getMinWalve() {
		return MinWalve;
	}

	public void setMinWalve(int minWalve) {
		MinWalve = minWalve;
	}

	@Column(name = "MaxWalve")
	public int getMaxWalve() {
		return MaxWalve;
	}

	public void setMaxWalve(int maxWalve) {
		MaxWalve = maxWalve;
	}

	@ManyToOne
	@JoinColumn(name="CommodityID")
	public TCommodity getTCommodity() {
		return TCommodity;
	}

	public void setTCommodity(TCommodity tCommodity) {
		TCommodity = tCommodity;
	}
	@Transient
	public Date getEndTime() {
		return endTime;
	}

	public void setEndTime(Date endTime) {
		this.endTime = endTime;
	}

	@Transient
	public int getNum() {
		return num;
	}

	public void setNum(int num) {
		this.num = num;
	}
	
	
}
